package com.diandian.backend.entrance.client.dto;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class CertificateCancelParamDTO implements Serializable {

    private String verify_id; // 【必传】代表券码一次核销的唯一标识（验券时返回）
    private String certificate_id; // 【必传】代表一张券码的标识（验券时返回）
    private String new_code; // 更新券码 如有撤销核销后变更券码的需求场景，则使用此参数
    private Long order_id; // 订单号 用code_with_biz_cancel_info撤销核销时，必传
    private CertificateCancelParamCodeWithBizCancel code_with_biz_cancel_info; // 核销时若使用code_with_biz_info核销，撤销核销用此参数

    public void check(){
        if(this.verify_id == null || "".equals(this.verify_id)){
            throw new DefaultException("代表券码一次核销的唯一标识不能为空");
        }
        if(this.certificate_id == null || "".equals(this.certificate_id)){
            throw new DefaultException("代表一张券码的标识不能为空");
        }
    }

    public String getVerify_id() {
        return verify_id;
    }

    public void setVerify_id(String verify_id) {
        this.verify_id = verify_id;
    }

    public String getCertificate_id() {
        return certificate_id;
    }

    public void setCertificate_id(String certificate_id) {
        this.certificate_id = certificate_id;
    }

    public String getNew_code() {
        return new_code;
    }

    public void setNew_code(String new_code) {
        this.new_code = new_code;
    }

    public Long getOrder_id() {
        return order_id;
    }

    public void setOrder_id(Long order_id) {
        this.order_id = order_id;
    }

    public CertificateCancelParamCodeWithBizCancel getCode_with_biz_cancel_info() {
        return code_with_biz_cancel_info;
    }

    public void setCode_with_biz_cancel_info(CertificateCancelParamCodeWithBizCancel code_with_biz_cancel_info) {
        this.code_with_biz_cancel_info = code_with_biz_cancel_info;
    }
}
